import NP from 'number-precision';
export namespace IoMath {
    export const plus = (...nums: number[]): number => {
        let result = 0;
        nums.forEach(e => {
            result = NP.plus(result, e);
        })
        return result;
    }
    export const sum = (arr: number[]): number => {
        let result = 0;
        arr.forEach(e => {
            result = NP.plus(result, e);
        })
        return result;
    }
    export const minus = (num1: number, ...nums: number[]): number => {
        let result = num1;
        nums.forEach(e => {
            result = NP.minus(result, e);
        })
        return result;
    }
    export const times = (...nums: number[]): number => {
        let result = 1;
        nums.forEach(e => {
            result = NP.times(result, e);
        })
        return result;
    }
    export const divide = (num1: number, ...nums: number[]): number => {
        let result = num1;
        nums.forEach(e => {
            result = NP.divide(result, e);
        })
        return result;
    }
}